<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>循环</title>
</head>
<body>
<div id="app">
    <li v-for="(item,index) in items">
        {{item.message}} -- {{index}}
    </li>
</div>

<!--导入Vue-->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
    var vm = new Vue({
        el:"#app",
        //model
        data: {
            items: [
                {message: '狂神说java'},
                {message: '你好 Vue'}
            ]
        }
    });
</script>
</body>
</html>
